package com.osig.ec.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.osig.common.persistence.Page;
import com.osig.ec.entity.MaAchieveCompare;
import com.osig.ec.entity.MaProduct;
import com.osig.ec.service.MaAchieveCompareService;
import com.osig.sys.dao.MaAchieveCompareDao;

@Service
@Transactional(readOnly = true)
public class MaAchieveCompareServiceImpl implements MaAchieveCompareService{

	@Autowired
	private MaAchieveCompareDao achieveCompareDao;
	
	public Page<MaAchieveCompare> findList(Page<MaAchieveCompare> page, MaAchieveCompare entity) {
		entity.setPage(page);
		List<MaAchieveCompare> list = achieveCompareDao.findList(entity);
		page.setList(list);
		return page;
	}

	@Transactional(readOnly = false)
	public int insert(MaAchieveCompare entity) {
		// TODO Auto-generated method stub
		return achieveCompareDao.insert(entity);
	}
	
	@Transactional(readOnly = false)
	public int update(MaAchieveCompare entity) {
		// TODO Auto-generated method stub
		return achieveCompareDao.update(entity);
	}

	@Transactional(readOnly = false)
	public int delete(MaAchieveCompare entity) {
		// TODO Auto-generated method stub
		return achieveCompareDao.delete(entity);
	}

	
}
